import { createApp,provide } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "./style/index.scss";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 时间、日期选择器改为中文
import locale from 'element-plus/lib/locale/lang/zh-cn';

// 全局进度条
import 'nprogress/nprogress.css'

import * as Icons from '@element-plus/icons'
import {toLine} from "./utils/toLine";
const app = createApp(App)
for (const [key, component] of Object.entries(Icons)) {
  app.component(key, component)
}
// 国际化
import { createI18n } from "vue-i18n";
import messages from "@/utils/language";

// 
import * as echarts from 'echarts'
provide('echarts', echarts)

//全局方法引入
import copy from './utils/copyMethod'
window.$copy = copy


const i18n = createI18n({
    locale: "zh-CN", //默认显示的语言
    messages,
});
app.use(store)
    .use(router)
    .use(ElementPlus,{locale})
    .use(i18n)
    .mount('#app')
